import turtle

def draw_stick_figure():
    # 创建画布和画笔
    screen = turtle.Screen()
    screen.title("简单的火柴人")
    screen.bgcolor("white")
    
    pen = turtle.Turtle()
    pen.speed(3)  # 绘制速度
    pen.pensize(3)  # 线条粗细
    
    # 绘制头部（圆形）
    pen.penup()
    pen.goto(0, 100)  # 移动到头部位置
    pen.pendown()
    pen.circle(30)  # 头部大小
    
    # 绘制身体
    pen.penup()
    pen.goto(0, 70)  # 从头部下方开始
    pen.pendown()
    pen.goto(0, -50)  # 身体长度
    
    # 绘制左臂
    pen.penup()
    pen.goto(0, 30)  # 手臂连接点
    pen.pendown()
    pen.goto(-60, 0)  # 左臂
    
    # 绘制右臂
    pen.penup()
    pen.goto(0, 30)  # 手臂连接点
    pen.pendown()
    pen.goto(60, 0)  # 右臂
    
    # 绘制左腿
    pen.penup()
    pen.goto(0, -50)  # 腿部连接点
    pen.pendown()
    pen.goto(-40, -120)  # 左腿
    
    # 绘制右腿
    pen.penup()
    pen.goto(0, -50)  # 腿部连接点
    pen.pendown()
    pen.goto(40, -120)  # 右腿
    
    # 隐藏画笔
    pen.hideturtle()
    
    # 保持窗口打开，点击关闭
    screen.exitonclick()

# 调用函数绘制火柴人
draw_stick_figure()
    